package com.tushare.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tushare.entity.Analyse;
import com.tushare.mapper.AnalyseMapper;
import com.tushare.service.IAnalyseService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author jobob
 * @since 2021-03-08
 */
@Service
public class AnalyseServiceImpl extends ServiceImpl<AnalyseMapper, Analyse> implements IAnalyseService {

    @Override
    public boolean saveAnalyse(Analyse analyse) {
        if (analyse == null) {
            return false;
        }
        return saveOrUpdate(analyse);
    }

    @Override
    public boolean saveAnalyseList(List<Analyse> analyseList) {
        if (analyseList == null || analyseList.size() == 0) {
            return false;
        }
        return getBaseMapper().saveAnalyseList(analyseList);
    }

    @Override
    public List<Analyse> getAnalyseList() {
        return getBaseMapper().getAnalyseList();
    }

    @Override
    public boolean deleteAllAnalyse() {
        return getBaseMapper().deleteAllAnalyse();
    }
}
